package de.dnb.gnd.exceptions;

import java.util.ArrayList;
import java.util.List;

public class CollectingHandler implements ExceptionHandler {

	private List<Exception> exceptions = new ArrayList<Exception>();

	public final List<Exception> getExceptions() {
		return this.exceptions;
	}

	@Override
	public final void handle(final Exception e, final String errorMessage) {
		this.exceptions.add(e);

		//message is ignored here, but could have been
		//collected too.

	}

}
